process.stdin.resume();
process.stdin.setEncoding('ascii');

var inputStr = "";
var input, inputHash = {}, count = 0, flags = ['w', 'x', 'y', 'z'];
var p, q, count = 0, resHash = {};

process.stdin.on('data', function (data) {
  inputStr = data.trim();
  process.stdin.emit('end');
});

process.stdin.on('end', function () {
  // if (inputStr === '') {
  //   process.stdin.emit('end');
  //   return ;
  // }
  input = inputStr.split(' ', 4);

  input = input.map(function (x, i) {
    inputHash[flags[i]] = parseInt(x);
    if (isNaN(inputHash[flags[i]])) process.exit(-1);
    return inputHash[flags[i]];
  });

  if (inputHash.x > 100 || inputHash.x < 1) {
    // console.error('invalid x input');
    process.exit(-1);
  } else if (inputHash.z > 100 || inputHash.z < 1) {
    // console.error('invalid z input');
    process.exit(-1);
  } else if (inputHash.w < 1 || inputHash.w > inputHash.x) {
    // console.error('w should between 1 and x');
    process.exit(-1);
  } else if (inputHash.y < 1 || inputHash.y > inputHash.z) {
    // console.error('y should between 1 and z');
    process.exit(-1);
  }

  for (p = inputHash.w; p <= inputHash.x; p++) {
   for (q = inputHash.y; q <= inputHash.z; q++) {
    var value = p/q;
    if (!resHash.hasOwnProperty(value)) {
      resHash[value] = true;
      count++;
    }
   }
  }

  console.log(count);
});
